﻿@model LPrisaMVC.Entities.PRODUCTO

@{
    ViewBag.Title = "Nuevo Producto";
}

<h2>Datos de Producto</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>PRODUCTO</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.CategoriaId, "CATEGORIA")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoriaId")
            @Html.ValidationMessageFor(model => model.CategoriaId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Codigo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Codigo)
            @Html.ValidationMessageFor(model => model.Codigo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Descripcion)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Descripcion)
            @Html.ValidationMessageFor(model => model.Descripcion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Costo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Costo)
            @Html.ValidationMessageFor(model => model.Costo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Precio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Precio)
            @Html.ValidationMessageFor(model => model.Precio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Stock)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Stock)
            @Html.ValidationMessageFor(model => model.Stock)
        </div>

        <p>
            <input type="submit" value="Crear" />
        </p>
    </fieldset>
    <pre></pre>
}

<div>
    @Html.ActionLink("Volver a la Lista de Productos", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
